# -*- encoding=utf8 -*-
import jsonschema


def assertUtill(self,resp,code,status):
    self.assertEqual(code,resp['code'])
    self.assertEqual(status, resp['status'])
    self.assertIsNotNone(resp['result'])

    schema = {
        "type" : "object",
        "properties" : {
            "code" : {"const" : code},
            "status" : {"const" : "success"},
            "result" : {"type" : "object"}
        },
        "required" : ["code","status","result"]
    }

    jsonschema.validate(instance=resp,schema=schema)